package com.sky.controller.admin;


import com.sky.result.Result;
import com.sky.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/shop")
public class ShopAdminController {
    @Autowired
    private ShopService shopService;


    /**
     * 查询店铺营业状态
     * @return
     */
    @GetMapping("/status")
    public Result<Integer> getStatus(){
        return shopService.getStatus();
    }


    /**
     * 修改店铺状态
     * @param status
     * @return
     */
    @PutMapping("/{status}")
    public Result changeShopStatus(@PathVariable  Integer status){
        return  shopService.changeShopStatus(status);
    }
}
